package com.ruoyi.znjc.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.znjc.mapper.ZnjcModelwarnlogMapper;
import com.ruoyi.znjc.domain.ZnjcModelwarnlog;
import com.ruoyi.znjc.service.IZnjcModelwarnlogService;

/**
 * 模型预警日志Service业务层处理
 * 
 * @author ZNJC
 * @date 2025-07-23
 */
@Service
public class ZnjcModelwarnlogServiceImpl implements IZnjcModelwarnlogService 
{
    @Autowired
    private ZnjcModelwarnlogMapper znjcModelwarnlogMapper;

    /**
     * 查询模型预警日志
     * 
     * @param warningId 模型预警日志主键
     * @return 模型预警日志
     */
    @Override
    public ZnjcModelwarnlog selectZnjcModelwarnlogByWarningId(Long warningId)
    {
        return znjcModelwarnlogMapper.selectZnjcModelwarnlogByWarningId(warningId);
    }

    /**
     * 查询模型预警日志列表
     * 
     * @param znjcModelwarnlog 模型预警日志
     * @return 模型预警日志
     */
    @Override
    public List<ZnjcModelwarnlog> selectZnjcModelwarnlogList(ZnjcModelwarnlog znjcModelwarnlog)
    {
        return znjcModelwarnlogMapper.selectZnjcModelwarnlogList(znjcModelwarnlog);
    }

    /**
     * 新增模型预警日志
     * 
     * @param znjcModelwarnlog 模型预警日志
     * @return 结果
     */
    @Override
    public int insertZnjcModelwarnlog(ZnjcModelwarnlog znjcModelwarnlog)
    {
        znjcModelwarnlog.setCreateTime(DateUtils.getNowDate());
        return znjcModelwarnlogMapper.insertZnjcModelwarnlog(znjcModelwarnlog);
    }

    /**
     * 修改模型预警日志
     * 
     * @param znjcModelwarnlog 模型预警日志
     * @return 结果
     */
    @Override
    public int updateZnjcModelwarnlog(ZnjcModelwarnlog znjcModelwarnlog)
    {
        return znjcModelwarnlogMapper.updateZnjcModelwarnlog(znjcModelwarnlog);
    }

    /**
     * 批量删除模型预警日志
     * 
     * @param warningIds 需要删除的模型预警日志主键
     * @return 结果
     */
    @Override
    public int deleteZnjcModelwarnlogByWarningIds(Long[] warningIds)
    {
        return znjcModelwarnlogMapper.deleteZnjcModelwarnlogByWarningIds(warningIds);
    }

    /**
     * 删除模型预警日志信息
     * 
     * @param warningId 模型预警日志主键
     * @return 结果
     */
    @Override
    public int deleteZnjcModelwarnlogByWarningId(Long warningId)
    {
        return znjcModelwarnlogMapper.deleteZnjcModelwarnlogByWarningId(warningId);
    }
}
